Converting Shapes From One Type to Another
QuickDraw GX allows you to change the types of the shape objects you have created. You use theGXGetShapeType
function, described on page 2-66 of this chapter, to determine the type of a shape. To convert a shape to a new type, you use theGXSetShapeType
function, described on page 2-66 of this chapter.The rules for conversion among shape geometries are specific to each shape type and thus are not described here. See the appropriate chapters of Inside Macintosh: QuickDraw GX Graphics and Inside Macintosh: QuickDraw GX Typography for this information. Table 2-5 describes where to look in each book for information regarding each possible kind of conversion.
Another common kind of shape conversion is not from one shape type to another, but from standard object form into primitive form. Some functions, such as
GXSetShapeClip
, described in the chapter "Transform Objects" in this book, require
a primitive shape to hold the clip shape. A primitive shape is a shape whose stylistic information has been incorporated into the shape's geometry. For example, a horizontal line with a thick pen style becomes a rectangle when converted to a primitive shape. To make a shape into a clip, you first convert it to its primitive form with the functionGXPrimitiveShape
. For more information about primitive shapes in general, see
the geometric operations chapter of Inside Macintosh: QuickDraw GX Graphics. For information on primitive shapes for typographic shapes, and the difference between usingGXPrimitiveShape
andGXSetShapeType
to obtain a primitive shape, see the typographic shapes chapter of Inside Macintosh: QuickDraw GX Typography.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help